Local Development with the OIDC Toolkit
Overview
The OIDC Toolkit provides a local development environment for building and testing OpenID Connect (OIDC) Single Sign-On integrations. It simulates the Candescent platform's OIDC flow, allowing you to develop and validate your integration before connecting to QA or production environments.
To setup the OIDC Toolkit, refer to the instructions in the README file.
What You Can Do
- Set up a complete OIDC Identity Provider locally.
- Generate test client credentials (
client_id,client_secret). - Download metadata and JWK files compatible with Candescent's format.
- Execute the full authorization code flow.
- Validate ID tokens and extract user claims.
- Run automated E2E tests to verify your integration.
Use the OIDC Toolkit during initial development to build and debug your OIDC client implementation. Once your integration works locally, proceed to QA validation with your Candescent PM.
Using the Toolkit
1. Generate Client Credentials
When the homepage loads, the toolkit automatically generates:
| Field | Description |
|---|---|
| Client ID | Public identifier for your OIDC client |
| Client Secret | Secret key for token exchange |
Credentials expire after 15 minutes and auto-regenerate. The page refreshes automatically.
2. Download Configuration Files
Click the buttons to download:
| File | Purpose | Use In Your App |
|---|---|---|
| Metadata | OIDC discovery document | Configure endpoints, scopes |
| JWK | RSA public key | Validate ID token signatures |
3. Configure Your Integration
Enter the required parameters:
| Parameter | Description | Example |
|---|---|---|
| Init URL | Your app's SSO entry point | http://localhost:3000/sso/init |
| Callback Host | OAuth redirect URI base | http://localhost:3000/callback |
Example Configuration:
If your application runs on localhost:3000, you might configure:
Init URL: http://localhost:3000/auth/sso/start
Callback Host: http://localhost:3000/auth/callback
For quick testing without a real app, you can use the toolkit's own URLs:
- Init URL:
http://localhost:8000 - Callback Host:
http://localhost:8000
This lets you test the OIDC flow end-to-end without building your own callback handler first.
4. Choose Display Mode
| Mode | Use Case |
|---|---|
| Open in Iframe | Embedded authentication experience |
| Open in new tab | Standard redirect-based flow |
For Iframe mode, also configure:
- Unique ID - Identifies the Iframe session.
- Display Width (%) - Controls Iframe width.
- Permissions - Camera/microphone access (if needed).
5. Execute the OIDC Flow
- Click Submit to save your configuration.
- Click Start OIDC SSO to initiate the flow.
- The toolkit simulates user authentication.
- Your callback receives the authorization code.
- Exchange the code for tokens.
Toolkit Endpoints
The toolkit exposes endpoints that mirror Candescent's OIDC implementation:
Authorization Endpoint
GET http://localhost:9000/api/auth/authorize
Parameters:
| Parameter | Required | Description |
|---|---|---|
client_id | Yes | From toolkit homepage |
response_type | Yes | Must be code |
scope | Yes | Must include openid |
redirect_uri | Yes | Your callback URL |
state | Recommended | CSRF protection token |
Example:
http://localhost:9000/api/auth/authorize?
client_id=YOUR_CLIENT_ID
&response_type=code
&scope=openid
&redirect_uri=https://yourapp.com/callback
&state=random_state_value
Token Endpoint
POST http://localhost:9000/api/auth/token
Headers:
Authorization: Basic <base64(client_id:client_secret)>
Content-Type: application/json
Body:
{
"code": "AUTHORIZATION_CODE"
}
Response:
{
"id_token": "eyJhbGciOiJSUzI1NiIs...",
"access_token": "abc123...",
"token_type": "Bearer",
"expires_in": 900
}
In production, the token endpoint uses application/x-www-form-urlencoded format instead of JSON. See the Technical Reference for production examples.
Validating Your Integration
Manual Validation
- Decode your ID token at jwt.io.
- Verify the signature using the downloaded JWK.
- Check all required claims are present and valid.
Automated Validation
The toolkit includes E2E tests to validate your integration:
- Complete steps 1-4 above (configure and run the OIDC flow).
- Navigate to the OIDC Validator page (link in top-right).
- Click Run Validator.
- Review the test results.
Available Reports:
| Report | Format | Purpose |
|---|---|---|
e2e-report.html | HTML | Human-readable test results |
jest-e2e.xml | JUnit XML | CI/CD integration |
Export Configuration
After successful validation:
- Click Publish OIDC Setting.
- Download
oidcConfig.json. - Use this configuration as a reference when connecting to Candescent environments.
Configuration Reference
Port Configuration
Edit sample-web-app/config.json:
{
"frontendPort": 8000,
"backendPort": 9000
}
Token Expiration
Edit sample-web-app/backend/src/ssoConfig/sso-config.json:
{
"auth_code_expires_in": 900,
"access_token_expires_in": 900,
"id_token_expires_in": 900
}
Values are in seconds (900 = 15 minutes).
Differences from Production
The toolkit simulates Candescent's OIDC flow, but some differences exist:
| Aspect | Toolkit | Production |
|---|---|---|
| Authorization URL | localhost:9000/api/auth/authorize | FI-specific domain |
| Token URL | localhost:9000/api/auth/token | api.candescent.com/.../token |
| Token Request Format | JSON body | application/x-www-form-urlencoded |
| User Authentication | Simulated (automatic) | Real FI login page |
| Credentials | Auto-generated, 15-min expiry | PM-provided, 90-day rotation |
| JWKS | Downloaded file | PM-provided file |
Once your integration works with the toolkit, contact your Candescent PM to begin QA validation with production-like credentials and endpoints.
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Credentials expired | 15-minute TTL | Refresh the page or wait for auto-refresh |
| Port already in use | Another service running | Edit sample-web-app/config.json to change ports |
| Token validation fails | JWK mismatch | Re-download JWK from toolkit |
| CORS errors | Frontend/backend port mismatch | Ensure both are running on configured ports |
| Docker pull unauthorized | Authentication required | Log in to GitHub Container Registry: docker login ghcr.io -u YOUR_GITHUB_USERNAME |
| Docker container won't start | Port conflict | Stop other services on ports 8000/9000 or use different ports |
Next Steps
After validating your integration locally:
- Contact your PM - Request QA environment access.
- Complete the Setup Checklist - Provide application details.
- Begin QA testing - Validate with real Candescent endpoints.
- Proceed to certification - Complete FI environment testing.
References
- Technical Reference - Full OIDC specification details
- FAQ & Troubleshooting - Common questions and issues
- OpenID Connect Core Spec
- OAuth 2.0 Framework (RFC 6749)